Skip to main content

Send Push Recommendation

πŸ“ Overview​

The SendPushRecommendation API is used to send recommendations to clients via push notifications.

πŸ”— Endpoint​

MethodURL
POST<protocol>://<host name>:<service port>/<service name>/<tenantid>/v1/SendPushRecommendation

Request​

The request consists of the following parameters:

πŸ“₯ Request Parameters​

ParameterData TypeMandatory / OptionalDescription
sessionKeystringMandatorySession key from AuthenticateKeys API. Must be passed as Bearer Authorization Header.
marketSegmentIDstringMandatoryValue should be refered from Market segment ID table
scripTokenstringMandatoryScrip token from scrip master.
scripDescriptionstringMandatoryScrip description from scrip master.
recoTypestringMandatoryValue should be refered from Recommendation type.
pricestringMandatoryRecommended price (e.g., 27.55). If blank/zero, system uses "Mkt".
squareoffPricestringOptionalSquare-off price. Must be > price for buy, < price for sell. "Mkt" if blank/zero.
stoplossPricestringOptionalStop-loss price. Must be < price for buy, > price for sell. "Mkt" if blank/zero.
messageTitlestringOptionalPush notification title. Default: "RESEARCH CALL".
reportUrlstringOptionalAnalysis report URL.
endTimestringOptionalValidity date/time. Format: ddMMMyyyy HH:mm:ss (e.g., 31Jul2019 23:59:00).
uniqueIDstringOptionalUnique reference identifier.
topicNostringMandatoryTopic number from GetFCMTopicList API
topicNamestringMandatoryTopic name from GetFCMTopicList API
channelIdsstringOptionalChannel IDs for which recommendation to be sent.
isHotstringOptionalFlag to mark as a hot recommendation.
isPopupstringOptionalSet true for popup in Diet/TWS apps.
isMessageBarstringOptionalSet true for MessageBar alert in Diet/TWS apps.
symbolstringOptionalSymbol for which recommendation is sent.
companyDescstringOptionalCompany description.
userCategoryIdstringOptionalRequired if channels include 1 or 2 (Email/SMS). Category from User Category IDs
userDetailsstringOptionalDollar-separated user list: UserId1,GroupId1$UserId2,GroupId2.
smsVendorstringOptionalRequired when channel includes SMS. Max 50 chars, alphanumeric, uppercase.
categoryModestringOptional1 = MessageCategoryMode, 2 = UserCategoryMode, 3 = Users.
messageCategoryIdstringOptionalMessage category ID. Defaults to MANUAL_RECO. Overrides topicNo & topicName.

Example Request​

Headers​

{
"Authorization": "Bearer eyBDyGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJDdXN0b21lcklkIjoiMTUyMyIsIm5Ob2RlTGljZW5zZUV4cGlyeSI6IjE4OTM2MDkwMDAiLCJpYXQiOjE1NjM2MDI2Nzd9.oRVgIlN3K_m5AXh_K1M88exzBg96CYJEVo_LQ-YZ6Yd"
}

Request Body​

{
"marketSegmentID": "1",
"scripToken": "842",
"scripDescription": "NSE EQ DHFL",
"recoType": "104",
"price": "48.95",
"squareoffPrice": "53.55",
"stoplossPrice": "45.55",
"messageTitle": "INTRADAY CALL",
"reportUrl": "",
"endTime": "31Jul2019 23:59:00",
"uniqueID": "31072019121508",
"topicNo": "6",
"topicName": "intraday",
"channelIds": "17$9",
"isHot": "true",
"isPopup": "true",
"isMessageBar": "true",
"symbol": "",
"companyDesc": "",
"userCategoryId": "",
"userDetails": "",
"smsVendor": "",
"categoryMode": "",
"messageCategoryId": ""
}

Response​

The ResponseObject contains the following parameters in a JSON structure:

πŸ§ͺ Response Parameters​

Parameter (Key)Data TypeDescription
statusbooleanIndicates the status of the request. true if the response is successful, false if an error occurred.
errorCodestringError code if any error occurred.
errorStringstringError description.
recoIDstringSystem‑generated recommendation ID used for updating this recommendation later.

Example Response​

{
"status": true,
"errorCode": "",
"errorString": "",
"recoID": "245WAADOAA"
}